package cn.itsource.wechat.mapper;

import cn.itsource.wechat.domain.WxUser;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.entity.Example;

public interface WxUserMapper extends Mapper<WxUser> {

    /**
     * 通过openid查询wxuser对象
     * @param openid
     * @return
     */
   default WxUser selectByOpenid(String openid){

       Example example = new Example(WxUser.class);
       example.and().andEqualTo("openid",openid);

       return this.selectOneByExample(example);
   }
}
